export const tryCatchFn = (tryFn: Function, catchFn?: Function, finallyFn?: Function) => {
  return new Promise(async (resolve, _reject) => {
    try {
      await tryFn()
    } catch (err) {
      catchFn && catchFn(err)
      // reject(err)
    } finally {
      finallyFn && finallyFn()
      resolve(true)
    }
  })
}
